'''
    移动零
'''

class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        if len(nums) == 0:
            return None
        left = self.removerOne(nums,0)
        # nums[left:len(nums)] = 0
        for i in range(left,len(nums)):
            nums[i] = 0
        

    def removerOne(self,nums,x):
        left = right = 0
        while right < len(nums):
            if nums[right] != x:
                nums[left] = nums[right]
                left += 1
            right += 1
        return left